#include				"AAsyncTcpSocket.h"

AAsyncTcpSocket::AAsyncTcpSocket()
{

}

AAsyncTcpSocket::~AAsyncTcpSocket()
{

}

size_t					AAsyncTcpSocket::read(void *data, size_t size)
{
	size_t				cnt = 0;
	char				*ret = (char*)data;

	if (!_buffer->empty() && size < (size_t)_buffer->size())
	{
		while (cnt < size)
		{
			ret[cnt] = _buffer->read();
			cnt++;
		}
	}
	return cnt;
}